﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace CommerceOne.Domains.Entities
{
    public class Category
    {
        public int Id { get; set; }
        public int? ParentId { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }

        [ForeignKey("ParentId")]
        public virtual List<Category> ChildCategory { get; set; }

        public virtual List<Product> Products { get; set; }

        [NotMapped]
        public int ProductCount { get; set; }
    }
}
